Background: Dysmenorrhea is one of the most common medical problems in gynecology causing several problems in the personal and social life of women. This study was conducted to compare the effect of thymus vulgaris and ibuprofen on the treatment of primary dysmenorrhea Methods: This clinical study was conducted on 84 students of Babol University of Medical Sciences with primary dysmenorrhea. The students were randomly assigned to three groups receiving thymus vulgaris, ibuprofen and placebo. In all three groups, with the beginning of pain, 200 mg capsules and 25 drops of essential oil were given every 6 hours for two consecutive cycles. Pain intensity used the visual scale before and one hour after each dose for 48 hour after starting medication. The data were collected and analyzed. This study was registered in the Iranian Registry of Clinical Trial (www.irct.ir) with registration number ID: IRCT201101245683N1Results: The mean age of participants was 20.5±1.8 years. Both thymus vulgaris and ibuprofen were effective to reduce the pain severity of dysmenorrhea. Before treatment, the mean pain intensity in thymus vulgaris, ibuprofen and placebo groups were 6.57±2.02, 5.30±2.23 and 6.18±1.78, respectively and after treatment decreased to 1.21±1.06, 1.48±1.62 and 3.54±2.26, respectively. Reduction of pain severity was not statistically significant between the two medications, however it was significant for each drug compared with placebo (p<0.001).Conclusion: The results suggest that thymus vulgaris as well as ibuprofen can be effective in reducing the severity of pain and spasm in primary dysmenorrhea.